package com.gitee.linmt.init;

import com.gitee.linmt.cache.CacheResultMessage;
import org.springframework.boot.CommandLineRunner;

import javax.annotation.Resource;

/**
 * 初始化 message.
 *
 * @author <a href="mailto:lin-mt@outlook.com">lin-mt</a>
 */
public class InitMessage<T> implements CommandLineRunner {
    
    @Resource
    private CacheResultMessage<T> cacheResultMessage;
    
    @Override
    public void run(final String... args) throws Exception {
        cacheResultMessage.cacheAll();
    }
}
